﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QD.Snapshot.Core.Util
{
    public class StringHelper
    {

        public static string urlStr;
        /// <summary>
        /// 编码
        /// </summary>
        /// <param name="s"></param>
        /// <returns></returns>
        public static string ConvertUrl(string s) {
            urlStr = string.Empty;
            foreach (byte b in Encoding.UTF8.GetBytes(s))
            {
                urlStr += '%' + b.ToString("X");
            }
            return urlStr;
        }
    }
}
